@extends('layouts.admin')
@section('css')
    <style>
        .visible-lg{
            display: inline-block !important;
        }
    </style>
@stop
@section('content')
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
        <form action="/Article/checkAll" method="post" >
            <h1 class="page-header">操作</h1>
            <ol class="breadcrumb">
                <li><a href="{{url('admin/article/create')}}">增加文章</a></li>
            </ol>
            <h1 class="page-header">管理 <span class="badge">7</span></h1>
            <div class="table-responsive">
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th><span class="glyphicon glyphicon-th-large"></span> <span class="visible-lg">选择</span></th>
                        <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">标题</span></th>
                        <th><span class="glyphicon glyphicon-list"></span> <span class="visible-lg">关键词</span></th>
                        <th class="hidden-sm"><span class="glyphicon glyphicon-tag"></span> <span class="visible-lg">标签</span></th>
                        <th class="hidden-sm"><span class="glyphicon glyphicon-comment"></span> <span class="visible-lg">点击</span></th>
                        <th><span class="glyphicon glyphicon-time"></span> <span class="visible-lg">日期</span></th>
                        <th><span class="glyphicon glyphicon-list-alt"></span> <span class="visible-lg">状态</span></th>
                        <th><span class="glyphicon glyphicon-pencil"></span> <span class="visible-lg">操作</span></th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($articles as $v)
                        <tr>
                            <td><input type="checkbox" class="input-control" name="checkbox[]" value="" /></td>
                            <td class="article-title">{{$v->title}}</td>
                            <td>{{$v->keywords}}</td>
                            <td class="hidden-sm">PHP、JavaScript</td>
                            <td class="hidden-sm">{{ $v->click }}</td>
                            <td>{{ $v->created_at }}</td>
                            <td>@if(is_null($v->deleted_at))
                                    √
                                @else
                                    ×
                                @endif
                            </td>
                            <td><a href="{{url('admin/article/edit',$v->id)}}">修改</a> <a href="{{url("admin/article/destroy",$v->id)}}" rel="6">删除</a></td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
            <footer class="message_footer">
                <nav>
                    <div class="btn-toolbar operation" role="toolbar">
                        <div class="btn-group" role="group"> <a class="btn btn-default" onClick="select()">全选</a> <a class="btn btn-default" onClick="reverse()">反选</a> <a class="btn btn-default" onClick="noselect()">不选</a> </div>
                        <div class="btn-group" role="group">
                            <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="删除全部选中" name="checkbox_delete">删除</button>
                        </div>
                    </div>
                    {{$articles->links("vendor.pagination.wcxadmin")}}
                </nav>
            </footer>
        </form>
    </div>
@stop